﻿using BCCommon;
using BCDto.WeChatComponent.WeChatUserTag;
using System;
using System.Collections.Generic;
using System.Text;

namespace BCService.WeChatComponent.WeChatUserTagService
{
    /// <summary>
    /// 微信用户标签服务接口
    /// </summary>
    public interface IWeChatUserTagService
    {
        /// <summary>
        /// 添加用户组标签
        /// </summary>
        /// <param name="name">标签名称</param>
        /// <returns></returns>
        WeChatUserTagDto Add(string name);
        /// <summary>
        /// 修改用户组标签
        /// </summary>
        /// <param name="id">标签Id</param>
        /// <param name="name">标签名称</param>
        /// <returns></returns>
        WeChatUserTagDto Update(int id, string name);
        /// <summary>
        /// 删除用户组标签
        /// </summary>
        /// <param name="id">标签Id</param>
        void Delete(int id);
        /// <summary>
        /// 获取用户组标签
        /// </summary>
        /// <param name="name">标签名称</param>
        /// <param name="start">开始时间</param>
        /// <param name="end">结束时间</param>
        /// <param name="ascending">排序</param>
        /// <param name="pageIndex">当前页码</param>
        /// <param name="pageSize">每页数据条数</param>
        /// <returns></returns>
        PageableList<WeChatUserTagDto> Get(string name, DateTime? start, DateTime? end, bool? ascending, int pageIndex = 1, int pageSize = 10);
        /// <summary>
        /// 获取用户组标签
        /// </summary>
        /// <returns></returns>
        IEnumerable<WeChatUserTagDto> Get();
        /// <summary>
        /// 同步用户组标签
        /// </summary>
        void SynchronizeUserTags();
        /// <summary>
        /// 给微信用户打标签
        /// </summary>
        /// <param name="tagid">标签Id</param>
        /// <param name="openid">用户OpenId</param>
        void Mark(long tagid,string openid);
        /// <summary>
        /// 移除微信用户标签
        /// </summary>
        /// <param name="tagid">标签Id</param>
        /// <param name="openid">用户OpenId</param>
        void UnMark(long tagid, string openid);
    }
}
